package com.smart.common.scheduler;

import com.smart.common.scheduler.service.UserAndProjectManagementScheduleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author: zyh
 * @date: 2023-09-25
 */
@Slf4j
@Component
public class UserAndProjectManagementScheduleTaskScheduler {

    @Autowired
    private UserAndProjectManagementScheduleService managementScheduleService;

    /**
     * 人员管理提醒 每周一上午十点半
     */
    @Scheduled(cron = "0 30 10 ? * MON")
    public void userWarn(){
        managementScheduleService.userWarn();
    }

    ///**
    // * 项目每周数据统计 每周五下午五点
    // */
    //@Scheduled(cron = "0 0 17 ? * FRI")
    //public void projectStatistics(){
    //    managementScheduleService.projectStatistics();
    //}

    /**
     * 平台每周数据统计 每周一上午八点
     */
    @Scheduled(cron = "0 0 10 ? * MON")
    public void platformStatistics(){
        managementScheduleService.platformStatistics();
    }
}
